home *** CD-ROM | disk | FTP | other *** search
/ Aminet 15 / Aminet 15 - Nov 1996.iso / Aminet / dev / basic / ace24dist.lha / ace24.lha / utils / ACEcalc / ACEcalc.doc < prev    next >
Text File  |  1996-09-10  |  5KB  |  154 lines

  1.  
  2.                 -------------------
  3.                 ACEcalc version 2.0
  4.                 ------------------- 
  5.  
  6.                     by
  7.  
  8.                 David J. Benn, November 1995
  9.  
  10.  
  11. CONTENTS
  12. --------
  13. ° General Description
  14. ° Order of Operations
  15. ° Accuracy of Calculations
  16. ° Error Messages
  17. ° Inside the Program
  18. ° Problems/Limitations
  19. ° Changes
  20. ° Contacting the Author
  21.             
  22.  
  23. General Description
  24. -------------------
  25. ACEcalc is Workbench calculator which allows for the construction and
  26. evaluation of fixed-point infix expressions.
  27.  
  28. Legal operators are: +,-,*,/,^ corresponding to addition, subtraction,
  29. multiplication, division, exponentiation. Two additional operators: (
  30. and ) allow sub-expressions to be parenthesised.
  31.  
  32. Unary functions currently provided are: SIN, COS, TAN, LOG, EXP, SQR,
  33. and INT which correspond to sine, cosine, tangent (these expect radians),
  34. natural logarithm, e raised to the power of n, square root and integer
  35. conversion with rounding. All functions take a single argument.
  36.  
  37. Expressions are entered either by clicking buttons on the calculator 
  38. with the mouse, or by using the Amiga's keyboard. In the latter case,
  39. the return/enter key has the same effect as "=", and the destructive
  40. backspace and Del keys correspond to the "«-" button on the calculator.
  41.  
  42. Note that all buttons in the first four rows have keyboard equivalents,
  43. but that none in the last two rows do.
  44.  
  45. There are three other calculator buttons of note: CLR, STO, RCL. The
  46. first clears the calculator's display. STO stores the current expression
  47. (shown in the calculator's display). RCL retrieves the most recently
  48. stored expression and displays it. There is only a single memory. In
  49. order to clear the memory, select CLR and STO in sequence.
  50.  
  51. Typical ACEcalc usage is somthing like this (comments in curly braces):
  52.  
  53.     (12+2)*3.5        {enter this expression}
  54.     =            {"=" button or keyboard equivalent}
  55.     49            {result appears in display}
  56.     STO            {store 49}
  57.     CLR            {clear the display}
  58.     SIN(            {enter "SIN("}
  59.     RCL            {recall memory contents}
  60.     )            {closing parenthesis}
  61.     =            {"=" button or keyboard equivalent}
  62.     -0.9537535        {result of SIN(49) appears in display}
  63.     
  64. The project menu has items for an About box and quitting. The program
  65. may be exited by selecting the latter from the Project menu, hitting
  66. Amiga-Q or clicking the calculator's close button.
  67.  
  68. Note that the calculator window may be dragged around the screen and
  69. depth arranged.
  70.  
  71.  
  72. Order of Operations
  73. -------------------
  74. Expression evaluation proceeds from left to right, with operation
  75. precedence as follows:
  76.  
  77.     1.     ()    
  78.     2.     SIN,COS,TAN,LOG,EXP,SQR,INT
  79.     3.    ^
  80.     4.    *,/
  81.     5.    +,-
  82.  
  83.  
  84. Accuracy of Calculations
  85. ------------------------
  86. Since ACEcalc only uses single-precision floating point math, the accuracy
  87. of results is limited to around 8 integer digits or 7 decimal places, and 
  88. beyond that, digits should be treated with suspicion.
  89.  
  90. A big advantage of single-precision math (Motorola FFP in this case) is
  91. that it's fast. However, when ACE (see "Inside the program") supports 
  92. double-precision (IEEE) floating point math, so will ACEcalc.
  93.  
  94.    
  95. Error Messages
  96. --------------
  97. If an expression is malformed and cannot meaningfully be evaluated,
  98. ACEcalc displays the message: SYNTAX ERROR.
  99.  
  100. If a divisor evaluates to zero the DIVISION BY ZERO message is displayed.
  101.  
  102. You should never see the STACK OVERFLOW or STACK UNDERFLOW messages. Let 
  103. me know if you do.
  104.  
  105.  
  106. Inside the Program
  107. ------------------
  108. ACEcalc was written in ACE BASIC, a freeware AmigaBASIC compiler (developed 
  109. by yours truly).
  110.  
  111. The calculator relies heavily upon ACE's GUI capabilities for the
  112. creation and handling of menus, buttons etc.
  113.  
  114. The expression evaluation engine is a recursive descent parser.
  115.  
  116.  
  117. Problems/Limitations
  118. --------------------
  119. ° While ACEcalc displays exponential format numbers when a result is
  120.   too large to be displayed in fixed point format, such results can
  121.   not be used as components in subsequent calculations.
  122.  
  123.  
  124. Changes
  125. -------
  126. Version 2.0    - Buttons now use topaz 8 font to avoid imagery mangling
  127.           when other default screen fonts are used.
  128.  
  129.         - Bug in exponentiation fixed: use of negative exponents
  130.             resulted in incorrect results. Also, since ACE v2.39
  131.           (unreleased at this time) uses single-precision IEEE
  132.           if available on the system in use, the results of
  133.           exponentiation are in general more accurate.
  134.  
  135.         - MsgBox function usage replaced by MsgBox statement.
  136.   
  137.     
  138. Contacting the Author
  139. ---------------------
  140. You can reach me in a number of ways:
  141.  
  142.     Internet:    D.Benn@appcomp.utas.edu.au
  143.     
  144.     CompuServe:    100033,605
  145.  
  146.     Phone:        (003) 261 461 [AH]
  147.  
  148.     Snail Mail:    9 Mayne Street,
  149.             Invermay, Tasmania,
  150.             Australia, 7248
  151.  
  152.  
  153.                 (*---oOo---*)
  154.